package com.blithe.wgt.core;

import android.content.Context;

public class BaseFramework {
    private static Context mContext;
    public static final String LOG_ACTIVITY = "log-activity";
    public static final String LOG_FRAGMENT = "log-fragment";
    public static final String LOG_SERVICE = "log-service";
    public static final String LOG_URL = "log-url";
    public static final String LOG_CONTENT = "log-content";

    public static boolean LOG = true;

    // 使用该框架必须先初始化
    public static void init(Context context, boolean isLog) {
        LOG = isLog;
        if (mContext == null) {
            mContext = context;
        }
    }

    public static Context getContext() {
        if (mContext == null) {
            throw new RuntimeException("使用该框架必须先初始化");
        }
        return mContext;
    }
}
